package com.shopping_back.service;

import com.shopping_back.pojo.dto.PayDTO;
import com.shopping_back.pojo.dto.RechargeDTO;
import com.shopping_back.pojo.entity.Sku;
import jakarta.servlet.http.HttpServletRequest;

import java.math.BigDecimal;
import java.util.Map;

public interface IPayService {
    /**
     * 根据 SKU ID 获取商品信息
     */
    Sku getSkuById(Long skuId);

    /**
     * 使用余额支付
     */
    String payWithBalance(PayDTO request, Long userId);

    // 生成支付宝页面支付表单 HTML
    String createAlipayPage(PayDTO dto) throws Exception;

    // 处理支付宝异步回调，返回 success/fail
    String handleAlipayNotify(HttpServletRequest request) throws Exception;

    Map<String, Object> getSimpleOrderInfo(String orderSn);

    String createRechargePage(Long userId, RechargeDTO dto) throws Exception;

    String createMemberPayPage(Long userId, Integer level, BigDecimal amount, Integer months) throws Exception;
}
